#ifndef _UDT_INITIALIZER_HPP
#define _UDT_INITIALIZER_HPP

#ifdef WIN32
	#define GLFW_EXPOSE_NATIVE_WIN32 1
	#define GLFW_EXPOSE_NATIVE_WGL 1
#endif

#include <WS2tcpip.h>
#include <udt.h>

static bool udtInitialized = false;

class __init
{
public:
	__init()
	{
		__init::init();
	}
private:
	static void terminate()
	{
		UDT::cleanup();
	}

	static void init()
	{
		if(!udtInitialized)
		{
			UDT::startup();
			atexit(terminate);
			udtInitialized = true;
		}
	}
};
static const __init UDT_INIT;

#endif